package com.fzg.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fzg.common.enums.ResponseWrapper;
import com.fzg.common.model.param.diary.AddDiaryParam;
import com.fzg.common.model.param.diary.CommentPublishParam;
import com.fzg.common.model.param.diary.GetDiaryListParam;
import com.fzg.common.model.param.diary.GetOtherUserDiaryList;
import com.fzg.entity.Diary;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author fzg
 * @since 2022-06-20
 */
public interface DiaryService extends IService<Diary> {

    /**
     * 获取日记列表
     * @param param 参数
     * @return ResponseWrapper
     */
    ResponseWrapper getDiaryListApi(HttpServletRequest request, GetDiaryListParam param);

    /**
     * 获取(其他人的)日记列表
     * @param param 参数
     * @return ResponseWrapper
     */
    ResponseWrapper getOtherUserDiaryList(GetOtherUserDiaryList param);


    /**
     * 根据日记aid后端获取日记相关的所有信息
     * @return ResponseWrapper
     */
    ResponseWrapper getDiaryAllInfoByAid(HttpServletRequest request, Integer aid);

    /**
     * 点击关注作者
     * @return ResponseWrapper
     */
    ResponseWrapper concernUser(HttpServletRequest request, Integer aid);


    /**
     * 取消关注作者
     * @return ResponseWrapper
     */
    ResponseWrapper cancelConcernUser(HttpServletRequest request, Integer aid);

    /**
     * 当前登陆的用户给这条日记点赞
     * @return ResponseWrapper
     */
    ResponseWrapper thumbsUpToDiary(HttpServletRequest request, Integer aid);

    /**
     * 当前登陆用户给这条日记取消点赞
     * @return ResponseWrapper
     */
    ResponseWrapper cancelThumbsUpToDiary(HttpServletRequest request, Integer aid);


    /**
     * 点击评论里面的赞，改变赞的状态
     * @return ResponseWrapper
     */
    ResponseWrapper clickCommentLike(HttpServletRequest request, Integer aid);

    /**
     * 发表评论
     * @return ResponseWrapper
     */
    ResponseWrapper diaryCommentPublish(HttpServletRequest request, CommentPublishParam param);


    /**
     * 获取系统给当前登陆的用户推荐的所有日记列表
     * @return ResponseWrapper
     */
    ResponseWrapper getRecommentDiaryList(HttpServletRequest request);

    /**
     * 获取当前登陆这个用户关注的所有用户的所有日记列表
     * @return ResponseWrapper
     */
    ResponseWrapper getCurrentUserConcernUserDiaryList(HttpServletRequest request);

    /**
     * 添加日记
     * @return ResponseWrapper
     */
    ResponseWrapper addOrEditDiary(HttpServletRequest request, @RequestBody AddDiaryParam param);

}
